3.103 \(\int \frac{x^3 (A+B x^2)}{a+b x^2+c x^4} \, dx\)

Optimal. Leaf size=97 \[ -\frac{\left (-2 a B c-A b c+b^2 B\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^2 \sqrt{b^2-4 a c}}-\frac{(b B-A c) \log \left (a+b x^2+c x^4\right )}{4 c^2}+\frac{B x^2}{2 c} \]

[Out]

(B*x^2)/(2*c) - ((b^2*B - A*b*c - 2*a*B*c)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c^2*Sqrt[b^2 - 4*a*c])
 - ((b*B - A*c)*Log[a + b*x^2 + c*x^4])/(4*c^2)

________________________________________________________________________________________

Rubi [A]  time = 0.116055, antiderivative size = 97, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {1251, 773, 634, 618, 206, 628} \[ -\frac{\left (-2 a B c-A b c+b^2 B\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^2 \sqrt{b^2-4 a c}}-\frac{(b B-A c) \log \left (a+b x^2+c x^4\right )}{4 c^2}+\frac{B x^2}{2 c} \]

Antiderivative was successfully verified.

[In]

Int[(x^3*(A + B*x^2))/(a + b*x^2 + c*x^4),x]

[Out]

(B*x^2)/(2*c) - ((b^2*B - A*b*c - 2*a*B*c)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c^2*Sqrt[b^2 - 4*a*c])
 - ((b*B - A*c)*Log[a + b*x^2 + c*x^4])/(4*c^2)

Rule 1251

Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2,
Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] &&
 IntegerQ[(m - 1)/2]

Rule 773

Int[(((d_.) + (e_.)*(x_))*((f_) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(e*g*x)/
c, x] + Dist[1/c, Int[(c*d*f - a*e*g + (c*e*f + c*d*g - b*e*g)*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c,
 d, e, f, g}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{x^3 \left (A+B x^2\right )}{a+b x^2+c x^4} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{x (A+B x)}{a+b x+c x^2} \, dx,x,x^2\right )\\ &=\frac{B x^2}{2 c}+\frac{\operatorname{Subst}\left (\int \frac{-a B+(-b B+A c) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 c}\\ &=\frac{B x^2}{2 c}-\frac{(b B-A c) \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^2}+\frac{\left (b^2 B-A b c-2 a B c\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^2}\\ &=\frac{B x^2}{2 c}-\frac{(b B-A c) \log \left (a+b x^2+c x^4\right )}{4 c^2}-\frac{\left (b^2 B-A b c-2 a B c\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 c^2}\\ &=\frac{B x^2}{2 c}-\frac{\left (b^2 B-A b c-2 a B c\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^2 \sqrt{b^2-4 a c}}-\frac{(b B-A c) \log \left (a+b x^2+c x^4\right )}{4 c^2}\\ \end{align*}

Mathematica [A]  time = 0.0680335, size = 93, normalized size = 0.96 \[ \frac{\frac{2 \left (-2 a B c-A b c+b^2 B\right ) \tan ^{-1}\left (\frac{b+2 c x^2}{\sqrt{4 a c-b^2}}\right )}{\sqrt{4 a c-b^2}}+(A c-b B) \log \left (a+b x^2+c x^4\right )+2 B c x^2}{4 c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^3*(A + B*x^2))/(a + b*x^2 + c*x^4),x]

[Out]

(2*B*c*x^2 + (2*(b^2*B - A*b*c - 2*a*B*c)*ArcTan[(b + 2*c*x^2)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] + (-(b*
B) + A*c)*Log[a + b*x^2 + c*x^4])/(4*c^2)

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 175, normalized size = 1.8 \begin{align*}{\frac{B{x}^{2}}{2\,c}}+{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) A}{4\,c}}-{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) bB}{4\,{c}^{2}}}-{\frac{aB}{c}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{Ab}{2\,c}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}+{\frac{{b}^{2}B}{2\,{c}^{2}}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(B*x^2+A)/(c*x^4+b*x^2+a),x)

[Out]

1/2*B*x^2/c+1/4/c*ln(c*x^4+b*x^2+a)*A-1/4/c^2*ln(c*x^4+b*x^2+a)*b*B-1/c/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(
4*a*c-b^2)^(1/2))*a*B-1/2/c/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*A*b+1/2/c^2/(4*a*c-b^2)^(1
/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*b^2*B

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(B*x^2+A)/(c*x^4+b*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.62066, size = 670, normalized size = 6.91 \begin{align*} \left [\frac{2 \,{\left (B b^{2} c - 4 \, B a c^{2}\right )} x^{2} -{\left (B b^{2} -{\left (2 \, B a + A b\right )} c\right )} \sqrt{b^{2} - 4 \, a c} \log \left (\frac{2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c +{\left (2 \, c x^{2} + b\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) -{\left (B b^{3} + 4 \, A a c^{2} -{\left (4 \, B a b + A b^{2}\right )} c\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}, \frac{2 \,{\left (B b^{2} c - 4 \, B a c^{2}\right )} x^{2} - 2 \,{\left (B b^{2} -{\left (2 \, B a + A b\right )} c\right )} \sqrt{-b^{2} + 4 \, a c} \arctan \left (-\frac{{\left (2 \, c x^{2} + b\right )} \sqrt{-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) -{\left (B b^{3} + 4 \, A a c^{2} -{\left (4 \, B a b + A b^{2}\right )} c\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(B*x^2+A)/(c*x^4+b*x^2+a),x, algorithm="fricas")

[Out]

[1/4*(2*(B*b^2*c - 4*B*a*c^2)*x^2 - (B*b^2 - (2*B*a + A*b)*c)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^4 + 2*b*c*x^2 + b
^2 - 2*a*c + (2*c*x^2 + b)*sqrt(b^2 - 4*a*c))/(c*x^4 + b*x^2 + a)) - (B*b^3 + 4*A*a*c^2 - (4*B*a*b + A*b^2)*c)
*log(c*x^4 + b*x^2 + a))/(b^2*c^2 - 4*a*c^3), 1/4*(2*(B*b^2*c - 4*B*a*c^2)*x^2 - 2*(B*b^2 - (2*B*a + A*b)*c)*s
qrt(-b^2 + 4*a*c)*arctan(-(2*c*x^2 + b)*sqrt(-b^2 + 4*a*c)/(b^2 - 4*a*c)) - (B*b^3 + 4*A*a*c^2 - (4*B*a*b + A*
b^2)*c)*log(c*x^4 + b*x^2 + a))/(b^2*c^2 - 4*a*c^3)]

________________________________________________________________________________________

Sympy [B]  time = 4.97837, size = 434, normalized size = 4.47 \begin{align*} \frac{B x^{2}}{2 c} + \left (- \frac{- A c + B b}{4 c^{2}} - \frac{\sqrt{- 4 a c + b^{2}} \left (A b c + 2 B a c - B b^{2}\right )}{4 c^{2} \left (4 a c - b^{2}\right )}\right ) \log{\left (x^{2} + \frac{2 A a c - B a b - 8 a c^{2} \left (- \frac{- A c + B b}{4 c^{2}} - \frac{\sqrt{- 4 a c + b^{2}} \left (A b c + 2 B a c - B b^{2}\right )}{4 c^{2} \left (4 a c - b^{2}\right )}\right ) + 2 b^{2} c \left (- \frac{- A c + B b}{4 c^{2}} - \frac{\sqrt{- 4 a c + b^{2}} \left (A b c + 2 B a c - B b^{2}\right )}{4 c^{2} \left (4 a c - b^{2}\right )}\right )}{A b c + 2 B a c - B b^{2}} \right )} + \left (- \frac{- A c + B b}{4 c^{2}} + \frac{\sqrt{- 4 a c + b^{2}} \left (A b c + 2 B a c - B b^{2}\right )}{4 c^{2} \left (4 a c - b^{2}\right )}\right ) \log{\left (x^{2} + \frac{2 A a c - B a b - 8 a c^{2} \left (- \frac{- A c + B b}{4 c^{2}} + \frac{\sqrt{- 4 a c + b^{2}} \left (A b c + 2 B a c - B b^{2}\right )}{4 c^{2} \left (4 a c - b^{2}\right )}\right ) + 2 b^{2} c \left (- \frac{- A c + B b}{4 c^{2}} + \frac{\sqrt{- 4 a c + b^{2}} \left (A b c + 2 B a c - B b^{2}\right )}{4 c^{2} \left (4 a c - b^{2}\right )}\right )}{A b c + 2 B a c - B b^{2}} \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3*(B*x**2+A)/(c*x**4+b*x**2+a),x)

[Out]

B*x**2/(2*c) + (-(-A*c + B*b)/(4*c**2) - sqrt(-4*a*c + b**2)*(A*b*c + 2*B*a*c - B*b**2)/(4*c**2*(4*a*c - b**2)
))*log(x**2 + (2*A*a*c - B*a*b - 8*a*c**2*(-(-A*c + B*b)/(4*c**2) - sqrt(-4*a*c + b**2)*(A*b*c + 2*B*a*c - B*b
**2)/(4*c**2*(4*a*c - b**2))) + 2*b**2*c*(-(-A*c + B*b)/(4*c**2) - sqrt(-4*a*c + b**2)*(A*b*c + 2*B*a*c - B*b*
*2)/(4*c**2*(4*a*c - b**2))))/(A*b*c + 2*B*a*c - B*b**2)) + (-(-A*c + B*b)/(4*c**2) + sqrt(-4*a*c + b**2)*(A*b
*c + 2*B*a*c - B*b**2)/(4*c**2*(4*a*c - b**2)))*log(x**2 + (2*A*a*c - B*a*b - 8*a*c**2*(-(-A*c + B*b)/(4*c**2)
 + sqrt(-4*a*c + b**2)*(A*b*c + 2*B*a*c - B*b**2)/(4*c**2*(4*a*c - b**2))) + 2*b**2*c*(-(-A*c + B*b)/(4*c**2)
+ sqrt(-4*a*c + b**2)*(A*b*c + 2*B*a*c - B*b**2)/(4*c**2*(4*a*c - b**2))))/(A*b*c + 2*B*a*c - B*b**2))

________________________________________________________________________________________

Giac [A]  time = 1.17829, size = 123, normalized size = 1.27 \begin{align*} \frac{B x^{2}}{2 \, c} - \frac{{\left (B b - A c\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, c^{2}} + \frac{{\left (B b^{2} - 2 \, B a c - A b c\right )} \arctan \left (\frac{2 \, c x^{2} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt{-b^{2} + 4 \, a c} c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(B*x^2+A)/(c*x^4+b*x^2+a),x, algorithm="giac")

[Out]

1/2*B*x^2/c - 1/4*(B*b - A*c)*log(c*x^4 + b*x^2 + a)/c^2 + 1/2*(B*b^2 - 2*B*a*c - A*b*c)*arctan((2*c*x^2 + b)/
sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*c^2)